package testPackage;

import java.util.*;

public class Main2 {

    int[] solution(int[][] arrays) {
        PriorityQueue<Integer> q = new PriorityQueue<>(new Comparator<Integer>() {
            @Override  //升序，--小根堆，得到最大的前k个
            public int compare(Integer i, Integer t1) {
                return i- t1;//换成，t1 - i;就变成降序了
            }
        });
        List<Integer> tempList = new ArrayList<>();
        return null;
    }



    public static void sort(List<Integer> list){
        for(int i = 0; i < list.size(); i++){
            for(int j = i; j <list.size(); j++){
                if(list.get(j) < list.get(i)){
                    int temp = list.get(i);
                    list.set(i, list.get(j));
                    list.set(j, temp);
                }
            }
        }
    }


    public static void main(String[] args) {
        int[][] input = new int[3][4];
        input[1] = new int[]{1, 3, 4, 5};
        input[2] = new int[]{1, 3, 4, 5};
        input[0] = new int[]{1};
        System.out.println(Arrays.deepToString(input));

        List<Integer> list = new ArrayList<>();

        list.add(1);
        list.add(3);
        list.add(2);
        list.add(0);
        list.add(4);

        sort(list);
        System.out.println(list);
    }
}
